﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace demo_cs
{
    public class GLPanel : UserControl
    {
        OpenGLContext _glContext;

        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            _glContext = new DemoContext(this);
        }

        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            _glContext.Draw();            
        }
    }
}
